package com.wc.AlgoOJ_train.train1.c6.A603;

import java.util.Arrays;
import java.util.Scanner;

/**
 * @Author congge
 * @Date 2024/1/10 21:17
 * @description 查找最大元素
 * http://43.138.190.70:8888/p/A603
 */
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            String s = sc.next();
            char[] chs = s.toCharArray();
            Arrays.sort(chs);
            String re = String.valueOf(chs[chs.length - 1]);
            s = s.replace(re, re + "(max)");
            System.out.println(s);
        }
    }
}
